package Passager;

public enum typeBillet {
	MODIFIABLE("modifiable"), NONMODIFIABLE("nonModifiable"), MODIFIABLESOUSCONDITION("modifiableCondition"), UNKNOW("unknow");
	public String type;
	
	private typeBillet(String type){
		this.type = type;
	}
	
    public static typeBillet toProfil(String profil) {
    	profil = profil.toUpperCase();
    	typeBillet retour = null;
        try {
            retour = Enum.valueOf(typeBillet.class, profil);
        } catch (Exception e) {
            retour = typeBillet.UNKNOW;
        }
        return retour;
    }

	/**
     * Print all valid commands to System.out.
     */
    public static void showAll() {
    	typeBillet[] tableProfil = typeBillet.values();
        for (typeBillet profil : tableProfil) {
            System.out.println(profil);
        }
    }
}
